/*     */ package com.qmsk.business.member.memberCashCoupDetail.dao;
/*     */ 
/*     */ import com.qmsk.business.sys.basic.SupportDAO;
/*     */ import com.utils.gson.in.GsonHeadManyRows;
/*     */ import com.utils.gson.in.GsonHeadOneRow;
/*     */ import com.utils.gson.out.GsonEbRst;
/*     */ import java.sql.SQLException;
/*     */ import java.util.HashMap;
/*     */ import java.util.Map;
/*     */ 
/*     */ public class MemberCashCouponDetailDAO extends SupportDAO
/*     */ {
/*     */   public GsonEbRst getGsonOfAll(Integer nPageIdx, Short nPageSize)
/*     */     throws SQLException
/*     */   {
/*  36 */     return getGsonOfParams("selectSqlOfAll", 
/*  37 */       "selectCountSqlOfAll", "selectJsonOfHead", nPageIdx, nPageSize);
/*     */   }
/*     */ 
/*     */   public GsonHeadOneRow getIntAmtMId(Long memberId) throws SQLException {
/*  41 */     Object[] params = { memberId };
/*  42 */     return getOneRowOfParams("selectSqlOfAmt", "selectJsonOfAmt", params);
/*     */   }
/*     */ 
/*     */   public Integer getcashCouPonOfMemberId(Long memberId) throws SQLException {
/*  46 */     Object[] params = { memberId };
/*  47 */     return queryForInt("selectSqlCashCouPonOfMemberId", params, Integer.valueOf(0));
/*     */   }
/*     */ 
/*     */   public int updateIntAmtMemberIt(Integer integral, Long memberID) throws SQLException
/*     */   {
/*  52 */     int status = 0;
/*  53 */     Map params = new HashMap();
/*  54 */     params.put("integral", integral);
/*  55 */     params.put("memberID", memberID);
/*  56 */     params.put("status", Integer.valueOf(status));
/*  57 */     return update("updateSqlIntAmtMemberIt", params);
/*     */   }
/*     */ 
/*     */   public int updateCashCouponMemberCs(Double cashCpon, Long memberID, Long detailId) throws SQLException
/*     */   {
/*  62 */     int status = 0;
/*  63 */     Map params = new HashMap();
/*  64 */     params.put("cashCpon", cashCpon);
/*  65 */     params.put("memberID", memberID);
/*  66 */     params.put("status", Integer.valueOf(status));
/*  67 */     params.put("detailId", detailId);
/*  68 */     return update("updateCashCouponMemberCs", params);
/*     */   }
/*     */ 
/*     */   public int updateCashCopDtlStatusOfIDFs(Long memberId, Long detailId, Double cashCop) throws SQLException
/*     */   {
/*  73 */     Object[] params = { cashCop, detailId, memberId };
/*  74 */     return update("updateCashCopDtlStatusOfIDFs", params);
/*     */   }
/*     */ 
/*     */   public int insertCashCoupDtialCash(Long memberId, Long shopId, Double FaceValue, Integer mberVday, Object inFrom, Object billId)
/*     */     throws SQLException
/*     */   {
/*  80 */     if ((mberVday.intValue() == 0) && (mberVday != null)) {
/*  81 */       mberVday = Integer.valueOf(10);
/*  82 */       Object[] params = new Object[] { memberId, shopId, FaceValue, 
/*  83 */         mberVday, mberVday, inFrom, billId };
/*  84 */       return update("insertSqlCashCoupDtialCashToYear", params);
/*     */     }
/*     */ 
/*  87 */     Object[] params = { memberId, shopId, FaceValue, 
/*  88 */       mberVday, mberVday, inFrom, billId };
/*  89 */     return update("insertSqlCashCoupDtialCash", params);
/*     */   }
/*     */ 
/*     */   public GsonEbRst getGsonOfmemberID(String memberID, String shopId)
/*     */     throws SQLException
/*     */   {
/*  96 */     Map params = new HashMap();
/*  97 */     params.put("memberId", memberID);
/*  98 */     params.put("status", Integer.valueOf(0));
/*  99 */     params.put("shopId", shopId);
/* 100 */     return getGsonOfParams("selectSqlOfAll", "selectJsonOfHead", params);
/*     */   }
/*     */ 
/*     */   public GsonHeadManyRows getSelectCashCouponDtialRslt(Object memberId, Object shopId) throws SQLException
/*     */   {
/* 105 */     int status = 0;
/* 106 */     Map params = new HashMap();
/* 107 */     params.put("status", Integer.valueOf(status));
/* 108 */     params.put("memberId", memberId);
/* 109 */     params.put("shopId", shopId);
/* 110 */     return getManyRowsOfParams("selectSqlPaidDetailID", 
/* 111 */       "selectJsonPaidDetailID", params);
/*     */   }
/*     */ 
/*     */   public int updateCashCouponDtlStatusOfID(Long memberId, Long detailId) throws SQLException
/*     */   {
/* 116 */     Object[] params = { detailId, memberId };
/* 117 */     return update("updateCashCouponDtlStatusOfID", params);
/*     */   }
/*     */ 
/*     */   public Double selectSqlCashCouponDtlSum(Long memberId) throws SQLException {
/* 121 */     Object[] params = { memberId };
/* 122 */     return queryForDouble("selectSqlCashCouponDtlSum", params, Double.valueOf(0.0D));
/*     */   }
/*     */ 
/*     */   public GsonEbRst getGsonOfmemberId(Long memberId) throws SQLException {
/* 126 */     Object[] params = { memberId };
/* 127 */     return getGsonOfParams("selectSqlOfmemberId", "selectJsonOfHead", params);
/*     */   }
/*     */ 
/*     */   public int deleteCashCop(Long memberId, Long shopId, Long billId) throws SQLException {
/* 131 */     Object[] params = { memberId, shopId, billId };
/* 132 */     return update("deletecashCop", params);
/*     */   }
/*     */ }

/* Location:           C:\Users\Administrator\Desktop\新建文件夹\WEB-INF\classes\
 * Qualified Name:     com.qmsk.business.member.memberCashCoupDetail.dao.MemberCashCouponDetailDAO
 * JD-Core Version:    0.5.3
 */